<?php
require './framework/Framework.class.php';
Framework::run();


//目录常量定义
//define('ROOT_PATH',getcwd().'/');
//define('APP_PATH',ROOT_PATH.'application/');
//define('FRAMEWORK_PATH',ROOT_PATH.'/framework/');
//function userAutoload($class_name){
////    var_dump($class_name,'<br/>');
//    $frame_class_list=[
////        '类名'=>'类文件地址'
//        'Controller'=>FRAMEWORK_PATH.'Controller.class.php',
//        'Model'=>FRAMEWORK_PATH.'Model.class.php',
//        'Factory'=>FRAMEWORK_PATH.'Factory.class.php',
//        'MySQLDB'=>FRAMEWORK_PATH.'MySQLDB.class.php',
//        'SessionDB'=>TOOL_PATH.'SessionDB.class.php',
//    ];
//    if (isset($frame_class_list[$class_name])){
//        require $frame_class_list[$class_name];
//    }elseif (substr($class_name,-10)=='Controller'){
//        require CURRENT_CONTROLLER_PATH.$class_name.'.class.php';
//    }elseif (substr($class_name,-5)=='Model'){
//        require CURRENT_MODEL_PATH.$class_name.'.class.php';
//    }
//}
//spl_autoload_register('userAutoload');
//
//$default_action='index';//默认动作
//$default_controller='MatchController';//默认控制器
//$default_platform='index';//默认平台--前台
//define('CONTROLLER',isset($_GET['c'])?$_GET['c']:$default_controller);//控制器
//define('ACTION',isset($_GET['a'])?$_GET['a']:$default_action);//动作
//define('PLATFORM',isset($_GET['p'])?$_GET['p']:$default_action);//平台
////当前平台相关路径常亮
//define('CURRENT_CONTROLLER_PATH',APP_PATH.PLATFORM.'/controller/');
//define('CURRENT_MODEL_PATH',APP_PATH.PLATFORM.'/model/');
//define('CURRENT_VIEW_PATH',APP_PATH.PLATFORM.'/view/');
//define('TOOL_PATH',FRAMEWORK_PATH.'tool/');
//
//$controller_name=CONTROLLER;
//$action_name=ACTION;
//$platform_name=PLATFORM;
//$controller=new $controller_name();
//$controller->$action_name();